% V20210224 - 18.4.2 jQuery Treeview Demo INCLUDE "GW.bas" % Create a page. p = GW_NEW_PAGE() % Prepare title bar string. GW_USE_THEME_CUSTO_ONCE("notext icon=back") lbtn$ = GW_ADD_BAR_LBUTTON$(">BACK") title$ = GW_ADD_BAR_TITLE$("jQuery Treeview Demo") % Add title to page. GW_ADD_TITLEBAR(p, lbtn$ + title$) % Reference the FancyTree online script. base_url$ = "https://www.jqueryscript.net/demo/jQuery-jQuery-UI-Dynamic-Tree-View-Plugin-Fancytree/" GW_INJECT_JS(p, base_url$ + "src/jquery.fancytree.js") % Also reference the FancyTree CSS file. GW_INJECT_CSS(p, base_url$ + "src/skin-win8/ui.fancytree.css") % Inject an HTML list of data. GW_INJECT_HTML(p, "
") GW_INJECT_HTML(p, " ") GW_INJECT_HTML(p, "
") % Render the page GW_RENDER(p) % Call the script to render the treeview. JS("$('#tree').fancytree()") DO % Wait for user action. r$ = GW_WAIT_ACTION$() % Place here any necessary code to process user actions. % Example feedback. POPUP r$ % End when BACK key is pressed. UNTIL r$ = "BACK" END "End of jQuery Treeview Demo"